package demomoreinher;

public class Text {
    public static void eatfunc(Animal animal){
        animal.eat();
    }
    public static void runfunc(IRunning running){
        running.run();
    }

    public static void main(String[] args) {
        eatfunc(new Fish("小鱼",3));
        eatfunc(new Duck("唐老鸭",10));
        runfunc(new Duck("唐老鸭",10));

    }
}
